package band.wukong.practice.springboot.spring4.basic.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @author wukong(wukonggg@139.com)
 */
@Component
public class SomePublisher {

    @Autowired
    private ApplicationContext context;

    public void publish(String msg) {
        context.publishEvent(new SomeEvent(this, msg));
    }
}
